<%@ include file="../common.jsp" %>

<script type="text/javascript">
	$(document).ready(function(){
		setPageTitle('<tiles:getAsString name="pageTitle"/>');
// 		createLayoutForAddOrEdit('uploadDocNorthPane','uploadDocTabs');
 		setWorkFlowURL('<c:out value="${flowExecutionUrl}" />');
		$( "#linkedDocId" ).selectable();		
		var statusMessage = "<c:out value='${statusMsg}' />";
		if(statusMessage && statusMessage.indexOf("Version of document", 0) != -1){
			alert(statusMessage);
			if(statusMessage.indexOf("changed successfully", 0)){
				goBack('back');
			}
		}
	});
</script>

<div align="center">
	<table class="bodyTable">
		<tr>
			<td>
				<table class="filtersTable zeroBorder" style="width: 100%;">
					<tr class="tableChildHeaderColor" align="left" style="width: 100%;">
						<td>
							<table style="width: 100%;" class="zeroBorder">
								<tr>
									<td style="width: 75%;">
										<table class="zeroBorder">
											<tr>
												<td class="spacingColumnWidthLess"></td>
												<td class="spacingColumnWidthLess"></td>
												<td style="vertical-align: middle;"><span class="tableMainHeaderFont"> VERSION CHANGE </span></td>
											</tr>
										</table>
									</td>
									<td align="right">
										<input type="hidden" value="ajaxRequest" name="ajaxSource">
										<input type="button" class="formButton" value="SUBMIT CHANGES" onclick="loadContentToServer('uploadNewDocForm','contentDiv')">	
										<input type="button" value="Back" class="formButton" onclick="javascript:goBack('back');"/>
									</td>
								</tr>
							</table>
						</td>
					</tr>
					<tr class="formSpacingRow formBlockColor"><td></td></tr>
					<tr>
						<td align="center">
						<div id="uploadDocTabs" class="formBlockColor"  style="overflow: auto;">
							<%-- <c:if test="${renewalDetailsForm.errorCount gt 0}">
								<span class="ui-widget errorMsg">The screen has some errors.</span>
							</c:if> --%>
							<form:form commandName="renewalDetailsForm" id="uploadNewDocForm" action="${flowExecutionUrl}" enctype="multipart/form-data" method="POST">
<%-- 							<form:hidden path="originalDocTypeId" value="-1"/> --%>
								<%-- <form:hidden path="docId" value="${docId}"/> --%>
								<table style="width: 100%;" border="0" class="formTable" >
									
									<tiles:insertAttribute name="attachDoc"></tiles:insertAttribute>
									
									<tr class="formSpacingRow formBlockColor">
										<td colspan="9">
											<hr>
										</td>
									</tr>
									
									<tiles:insertAttribute name="attrDetails"></tiles:insertAttribute>
									
									<tr class="formSpacingRow formBlockColor">
										<td colspan="9">
											<hr>
										</td>
									</tr>
									
									<tiles:insertAttribute name="ownerDetails"></tiles:insertAttribute>
									
									<tr class="formSpacingRow formBlockColor">
										<td colspan="9">
											<hr>
										</td>
									</tr>
									
									<tiles:insertAttribute name="validityDetails"></tiles:insertAttribute>
									
									<!-- <tr class="formSpacingRow formBlockColor">
										<td colspan="9">
											<hr>
										</td>
									</tr>
									<tr>
										<td colspan="5"></td>
										<td colspan="3" align="right">
											<input type="reset" value="RESET" name="resetForm" class="resetButton">
											<span class="spacingColumnWidthLess">&nbsp;</span>
										</td>
										<td class="spacingColumnWidthLess"></td>
									</tr>	 -->												
								</table>
							</form:form>
					</div>
						</td>
				</table>
			</td>
		</tr>
	</table>
</div>

<%-- <div id="uploadDocNorthPane" class="ui-layout-north ui-widget-header">
	<table class="tabsHeaderTable" >
		<tr>
			<td><span>View Document</span></td>
			<td style="width: 35.0em;"></td>
<!-- 			<td>
				<input type="button" value="Back" onclick="javascript:workFlowDetail('uploadNewDocForm','back');"/>
			</td> -->
		</tr>
	</table>	
</div>
	<form:form commandName="renewalDetailsForm" id="uploadNewDocForm" action="${flowExecutionUrl}" enctype="multipart/form-data" method="POST">
		<div id="uploadDocTabs" class="ui-layout-center">
		<label class="infoClass"><c:out value="${statusMsg}"></c:out></label>
		<table style="width: 90%">
			<tr>
				<td>
					<table>
						<tiles:insertAttribute name="attrDetails"></tiles:insertAttribute>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<hr/>
					<table>
						<tiles:insertAttribute name="ownerDetails"></tiles:insertAttribute>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<hr/>
					<table>
						<tiles:insertAttribute name="validityDetails"></tiles:insertAttribute>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<hr/>
					<table>
						<tiles:insertAttribute name="attachDoc"></tiles:insertAttribute>
					</table>
				</td>
			</tr>			
		</table>
	</div>		
</form:form> --%>